package o;

import android.content.Context;
import com.huawei.appmarket.R;
import java.util.Map;
import o.cvx.a;

public class drc {

    public enum c {
        STORE,
        UC,
        MW,
        JXS,
        UAS,
        GAMEWEB,
        FORUMAPI,
        FORUMWAP,
        CASDOMAIN,
        AHEADCONN,
        GALLERYDOMAIN,
        DEVDOMAIN,
        OTAHOST,
        DPS
    }

    public static void ˏ(Context context) {
        ˊ(context);
    }

    private static void ˊ(Context context) {
        a aVar = new a();
        aVar.ˊ(context.getResources().getString(R.string.agreement_domain_url));
        cvx.ॱ("user.protocol.domian", aVar);
        aVar = new a();
        aVar.ˊ(context.getResources().getString(R.string.app_privacy_config));
        cvx.ॱ("app.privacy.domain", aVar);
        aVar = new a();
        aVar.ˊ(context.getResources().getString(R.string.consumer_privacy_config));
        cvx.ॱ("consumer.privacy.domain", aVar);
    }

    private static String ˋ(Map<String, String> map, String str, String str2) {
        return (map == null || str == null || !map.containsKey(str)) ? str2 : (String) map.get(str);
    }

    public static void ॱ(Map<String, String> map) {
        String str = (String) map.get(c.STORE.toString());
        String str2 = (String) map.get(c.UC.toString());
        String str3 = (String) map.get(c.MW.toString());
        String str4 = (String) map.get(c.JXS.toString());
        String str5 = (String) map.get(c.UAS.toString());
        String str6 = (String) map.get(c.FORUMAPI.toString());
        String str7 = (String) map.get(c.FORUMWAP.toString());
        String str8 = (String) map.get(c.GAMEWEB.toString());
        String str9 = (String) map.get(c.CASDOMAIN.toString());
        String str10 = (String) map.get(c.AHEADCONN.toString());
        String str11 = (String) map.get(c.GALLERYDOMAIN.toString());
        String str12 = (String) map.get(c.DEVDOMAIN.toString());
        String str13 = (String) map.get(c.OTAHOST.toString());
        String str14 = (String) map.get(c.DPS.toString());
        Map ˊ = dqy.ˊ();
        if (!(ˊ == null || ˊ.isEmpty())) {
            str = ˋ(ˊ, "server.store", str);
            str2 = ˋ(ˊ, "server.uc", str2);
            str3 = ˋ(ˊ, "mobileweb.url", str3);
            str4 = ˋ(ˊ, "jxs.url", str4);
            str5 = ˋ(ˊ, "uas.url", str5);
            str6 = ˋ(ˊ, "jgw.url", str6);
            str7 = ˋ(ˊ, "forumwap.url", str7);
            str8 = ˋ(ˊ, "gamewap.url.local", str8);
            str9 = ˋ(ˊ, "casdomain.url", str9);
            str10 = ˋ(ˊ, "ahead.conn.url", str10);
            str11 = ˋ(ˊ, "gallery.domain.url", str11);
            str12 = ˋ(ˊ, "developer.domain.url", str12);
            str13 = ˋ(ˊ, "ota.host", str13);
            str14 = ˋ(ˊ, "server.dps", str14);
        }
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("initServerUrl for[");
        a aVar = new a();
        aVar.ˊ(str);
        cvx.ॱ("server.store", aVar);
        stringBuilder.append("server.store").append(":").append(aVar).append("]");
        a aVar2 = new a();
        aVar2.ˊ(str2);
        cvx.ॱ("server.uc", aVar2);
        stringBuilder.append("server.uc").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str3);
        cvx.ॱ("mobileweb.url", aVar2);
        stringBuilder.append("mobileweb.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str4);
        cvx.ॱ("jxs.url", aVar2);
        stringBuilder.append("jxs.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str5);
        cvx.ॱ("uas.url", aVar2);
        stringBuilder.append("uas.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str8);
        cvx.ॱ("gamewap.url.local", aVar2);
        stringBuilder.append("gamewap.url.local").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str6);
        cvx.ॱ("jgw.url", aVar2);
        stringBuilder.append("jgw.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str7);
        cvx.ॱ("forumwap.url", aVar2);
        stringBuilder.append("forumwap.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str9);
        cvx.ॱ("casdomain.url", aVar2);
        stringBuilder.append("casdomain.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str10);
        cvx.ॱ("ahead.conn.url", aVar2);
        stringBuilder.append("ahead.conn.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str11);
        cvx.ॱ("gallery.domain.url", aVar2);
        stringBuilder.append("gallery.domain.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str12);
        cvx.ॱ("developer.domain.url", aVar2);
        stringBuilder.append("developer.domain.url").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str13);
        cvx.ॱ("ota.host", aVar2);
        stringBuilder.append("ota.host").append(":").append(aVar2).append("]");
        aVar2 = new a();
        aVar2.ˊ(str14);
        cvx.ॱ("server.dps", aVar2);
        stringBuilder.append("server.dps").append(":").append(aVar2).append("]");
        Logger.ˏ("ServerUrl", stringBuilder.toString());
    }
}
